<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="expires" content="wed, 26 feb 1997 08:21:57 gmt"> 
	<title>图片库</title>
	<meta name="author" content="phpok.com" />
	<link rel="stylesheet" type="text/css" href="{#css#}/artdialog.css" />
	<link rel="stylesheet" type="text/css" href="{#css#}/smartmenu.css" />
	<style type="text/css">
	html{font-size:14px;font-family:"Microsoft Yahei","宋体","Arial","Tahoma";margin:0;padding:0;background:#FFFFFF;}
	body{margin:3px;padding:0;overflow-y:scroll;_margin:0; _height:100%;}
	a{color:#000;text-decoration: none;}
	ul.filelist{list-style:none;padding:0;margin:0}
	ul.filelist li{float:left;margin:3px 5px;height:75px;width:296px;padding:1px;border:1px solid #ccc;cursor:pointer;position: relative;z-index:1}
	ul.filelist li:hover{background:#FCFCFC;}
	ul.filelist li .checkbox{position: absolute;left:1px;top:1px;z-index:2;}
	ul.filelist li .ico{float:left;width:75px;height:75px;text-align:center;position:relative;margin-right:5px;}
	ul.filelist li .note{float:left;width:210px;overflow:hidden;}
	ul.filelist li .note .info{line-height:22px;overflow:hidden;height:22px;}
	ul.filelist li img.img{width:73px;height:73px;text-align:center;padding:1px;}
	.pagelist{text-align:center;height:30px;overflow:hidden;margin-top:7px;}
	.pagelist ul{list-style:none;margin:0;padding:0;text-align:center;}
	.pagelist ul li{display:inline;height:22px;line-height:24px;margin:0 5px 0 0;}
	.pagelist ul li a{display:inline;padding:1px 5px;border:1px solid #ddd;cursor:pointer;}
	.pagelist ul li a:hover{background:#efefef;border:1px solid #ccc;text-decoration:none;}
	.pagelist ul li a.current{background:#E4E4E4;border:1px solid #ccc;text-decoration:none;}
	div.clear{clear:both;height:0;line-height:0;overflow:hidden;display:block;visibility:hidden;}
	.search{border:1px solid #E5E5E5;background:#F5F5F5;padding-left:12px;line-height:25px;margin-top:3px;}
	select{padding:3px;}
	input.keywords{width:150px;padding:3px;border:1px solid #ABADB3;}
	</style>
	{func phpok_head_css}
	<script type="text/javascript" src="{url ctrl=js ext=jquery.artdialog.js /}"></script>
	{func phpok_head_js}
	<!-- plugin head -->
	<script type="text/javascript">
	function check_search()
	{
		if(!$("#keywords").val()){
			$.dialog.alert('请输入要搜索的关键字');
			return false;
		}
		return true;
	}
	function save(editor)
	{
		var id = $.checkbox.join();
		if(!id){
			$.dialog.alert(p_lang('请选择要插入的图片'));
			return false;
		}
		var list = id.split(',');
		var html = '';
		for(var i in list){
			var url = $("#t_"+list[i]).attr('data-url');
			var tit = $("#t_"+list[i]).attr('data-title');
			html += '<p><img src="'+url+'" alt="'+tit+'" title="'+tit+'"/></p>';
		}
		editor.insertHtml(html);
		$.dialog.close();
		return true;
	}
	</script>
</head>
<body>
<div class="search">
	<form method="post" action="{url ctrl=ckeditor func=images/}" onsubmit="return check_search()">
	<table>
	<tr>
		<td>搜索：</td>
		<td><input type="text" name="keywords" id="keywords" value="{$keywords}" class="keywords" /></td>
		<td><input type="submit" value=" {lang搜索} " /></td>
		<td><input type="button" value=" {lang取消搜索} " onclick="$.phpok.go('{url ctrl=ckeditor func=images/}')" /></td>
		<td><input type="button" value=" {lang刷新} " onclick="$.phpok.reload()" /></td>
	</tr>
	</table>
	</form>
</div>
<ul class="filelist">
	<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
	<li id="li_{$value.id}" data="{$value.id}">
		<label>
		<div class="li_bg">
			<input type="checkbox" class="checkbox" id="t_{$value.id}" value="{$value.id}" data-url="{$value.url}" data-title="{$value.title}" />
			<div class="ico"><img src="{$value.ico}" class="img" /></div>
			<div class="note">
				<div class="info">{$value.title}</div>
				<div class="info">{func date "Y-m-d H:i" $value.mtime}</div>
				<div class="info">{$value.width} x {$value.height}</div>
			</div>
			<div class="clear"></div>
		</div>
		</label>
	</li>
	<!-- /loop -->
	<div class="clear"></div>
</ul>
<!-- if $pagelist -->
<div class="pagelist">
<ul>
	<!-- loop from=$pagelist key=$key value=$value id=$tmpid -->
	<li><a href="{$value.url}"{if $value.status} class="current"{/if}>{$value.title}</a></li>
	<!-- /loop -->
</ul>
</div>
<!-- /if -->

<script type="text/javascript">
function stop(){
	return false;
}
document.oncontextmenu=stop;
</script>
</body>
</html>